/**
 * Created by mac on 2017/12/22.
 */
import React, {Component} from 'react';
import {Button, DatePicker, Icon} from 'antd'
export default class UserInfo extends Component {
    render() {
        const {isLoading, errorMsg, userInfo, getUserInfo} = this.props
        return (
            <div>
                {isLoading ? '请求信息中' :
                    (errorMsg ?
                        errorMsg :
                        <div>
                            <p>用户信息:</p>
                            <p>用户名:{userInfo.name}</p>
                            <p>介绍:{userInfo.intro} </p>
                        </div>)
                }
                <Button type='danger' onClick={getUserInfo}>请求用户信息</Button>
                <DatePicker/>
            </div>
        )
    }
}